#!/usr/bin/python
# -*- coding: utf8 -*-

def ggt(n,m):
	if n>=m:
		a=n
		b=m
	else:
		a=m
		b=n
	while b>0:
		h=b
		b=a % b
		a=h
	return a	
				
if __name__ == "__main__":
    print(ggt(62,24))				
